package com.TwinBlade.PicturePassword;

import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Application;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build.VERSION;
import android.os.Vibrator;
import android.preference.PreferenceManager;
import android.util.DisplayMetrics;
import android.widget.Toast;
import org.acra.ACRA;
import org.acra.a.a;

@a(i="", j="https://wintersacrareporter.appspot.com/acrareport", k="kevdliu", l="ArchAng3L")
public class Utilities extends Application
{
  public static boolean a = true;
  public static int b;
  public static Context c;
  public static bl d;
  public static ak e;
  private static Toast f;
  private static int g = 0;
  private static int h = 0;
  private static int i = 0;
  private static SharedPreferences j;

  public static void a(Context paramContext)
  {
    ((NotificationManager)paramContext.getSystemService("notification")).cancelAll();
  }

  public static void a(Context paramContext, String paramString)
  {
    AlertDialog.Builder localBuilder = new AlertDialog.Builder(paramContext);
    localBuilder.setTitle("Message");
    localBuilder.setMessage(paramString);
    localBuilder.setPositiveButton(paramContext.getString(2131296292), new db());
    localBuilder.create().show();
  }

  // ERROR //
  public static void a(Context paramContext, String paramString, int paramInt, boolean paramBoolean)
  {
    // Byte code:
    //   0: iload_3
    //   1: ifeq +233 -> 234
    //   4: new 95	android/widget/TextView
    //   7: dup
    //   8: getstatic 97	com/TwinBlade/PicturePassword/Utilities:c	Landroid/content/Context;
    //   11: invokespecial 98	android/widget/TextView:<init>	(Landroid/content/Context;)V
    //   14: astore 4
    //   16: aload 4
    //   18: sipush 200
    //   21: bipush 57
    //   23: sipush 146
    //   26: sipush 181
    //   29: invokestatic 104	android/graphics/Color:argb	(IIII)I
    //   32: invokevirtual 108	android/widget/TextView:setBackgroundColor	(I)V
    //   35: aload 4
    //   37: bipush 17
    //   39: invokevirtual 111	android/widget/TextView:setGravity	(I)V
    //   42: aload 4
    //   44: ldc 112
    //   46: invokevirtual 116	android/widget/TextView:setTextSize	(F)V
    //   49: aload 4
    //   51: sipush 255
    //   54: sipush 255
    //   57: sipush 255
    //   60: invokestatic 120	android/graphics/Color:rgb	(III)I
    //   63: invokevirtual 123	android/widget/TextView:setTextColor	(I)V
    //   66: aload 4
    //   68: new 125	java/lang/StringBuilder
    //   71: dup
    //   72: ldc 127
    //   74: invokespecial 130	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   77: aload_1
    //   78: invokevirtual 134	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   81: ldc 127
    //   83: invokevirtual 134	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   86: invokevirtual 138	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   89: invokevirtual 142	android/widget/TextView:setText	(Ljava/lang/CharSequence;)V
    //   92: iload_2
    //   93: iconst_4
    //   94: if_icmpne +44 -> 138
    //   97: new 144	android/widget/Toast
    //   100: dup
    //   101: aload_0
    //   102: invokespecial 145	android/widget/Toast:<init>	(Landroid/content/Context;)V
    //   105: putstatic 147	com/TwinBlade/PicturePassword/Utilities:f	Landroid/widget/Toast;
    //   108: getstatic 147	com/TwinBlade/PicturePassword/Utilities:f	Landroid/widget/Toast;
    //   111: aload 4
    //   113: invokevirtual 151	android/widget/Toast:setView	(Landroid/view/View;)V
    //   116: getstatic 147	com/TwinBlade/PicturePassword/Utilities:f	Landroid/widget/Toast;
    //   119: bipush 80
    //   121: iconst_0
    //   122: bipush 25
    //   124: invokevirtual 154	android/widget/Toast:setGravity	(III)V
    //   127: getstatic 147	com/TwinBlade/PicturePassword/Utilities:f	Landroid/widget/Toast;
    //   130: invokevirtual 155	android/widget/Toast:show	()V
    //   133: iload_2
    //   134: putstatic 34	com/TwinBlade/PicturePassword/Utilities:g	I
    //   137: return
    //   138: iload_2
    //   139: iconst_2
    //   140: if_icmpne +322 -> 462
    //   143: getstatic 34	com/TwinBlade/PicturePassword/Utilities:g	I
    //   146: iconst_4
    //   147: if_icmpeq +9 -> 156
    //   150: getstatic 147	com/TwinBlade/PicturePassword/Utilities:f	Landroid/widget/Toast;
    //   153: ifnonnull -45 -> 108
    //   156: new 144	android/widget/Toast
    //   159: dup
    //   160: aload_0
    //   161: invokespecial 145	android/widget/Toast:<init>	(Landroid/content/Context;)V
    //   164: putstatic 147	com/TwinBlade/PicturePassword/Utilities:f	Landroid/widget/Toast;
    //   167: goto -59 -> 108
    //   170: getstatic 34	com/TwinBlade/PicturePassword/Utilities:g	I
    //   173: iconst_4
    //   174: if_icmpeq +16 -> 190
    //   177: getstatic 34	com/TwinBlade/PicturePassword/Utilities:g	I
    //   180: iconst_3
    //   181: if_icmpeq +9 -> 190
    //   184: getstatic 147	com/TwinBlade/PicturePassword/Utilities:f	Landroid/widget/Toast;
    //   187: ifnonnull -79 -> 108
    //   190: new 144	android/widget/Toast
    //   193: dup
    //   194: aload_0
    //   195: invokespecial 145	android/widget/Toast:<init>	(Landroid/content/Context;)V
    //   198: putstatic 147	com/TwinBlade/PicturePassword/Utilities:f	Landroid/widget/Toast;
    //   201: goto -93 -> 108
    //   204: iload_2
    //   205: ifne -97 -> 108
    //   208: getstatic 147	com/TwinBlade/PicturePassword/Utilities:f	Landroid/widget/Toast;
    //   211: ifnull +9 -> 220
    //   214: getstatic 34	com/TwinBlade/PicturePassword/Utilities:g	I
    //   217: ifeq -109 -> 108
    //   220: new 144	android/widget/Toast
    //   223: dup
    //   224: aload_0
    //   225: invokespecial 145	android/widget/Toast:<init>	(Landroid/content/Context;)V
    //   228: putstatic 147	com/TwinBlade/PicturePassword/Utilities:f	Landroid/widget/Toast;
    //   231: goto -123 -> 108
    //   234: getstatic 157	com/TwinBlade/PicturePassword/Utilities:j	Landroid/content/SharedPreferences;
    //   237: ldc 159
    //   239: iconst_1
    //   240: invokeinterface 165 3 0
    //   245: istore 6
    //   247: getstatic 157	com/TwinBlade/PicturePassword/Utilities:j	Landroid/content/SharedPreferences;
    //   250: ldc 167
    //   252: iconst_1
    //   253: invokeinterface 165 3 0
    //   258: istore 7
    //   260: aload_0
    //   261: iconst_0
    //   262: new 169	android/content/Intent
    //   265: dup
    //   266: ldc 170
    //   268: invokespecial 171	android/content/Intent:<init>	(Ljava/lang/String;)V
    //   271: iconst_0
    //   272: invokestatic 177	android/app/PendingIntent:getActivity	(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;
    //   275: astore 9
    //   277: aload_0
    //   278: ldc 44
    //   280: invokevirtual 50	android/content/Context:getSystemService	(Ljava/lang/String;)Ljava/lang/Object;
    //   283: checkcast 52	android/app/NotificationManager
    //   286: astore 10
    //   288: new 179	android/app/Notification
    //   291: dup
    //   292: ldc 180
    //   294: aload_1
    //   295: invokestatic 186	java/lang/System:currentTimeMillis	()J
    //   298: invokespecial 189	android/app/Notification:<init>	(ILjava/lang/CharSequence;J)V
    //   301: astore 11
    //   303: aload 11
    //   305: aload_0
    //   306: aload_1
    //   307: ldc 170
    //   309: aload 9
    //   311: invokevirtual 193	android/app/Notification:setLatestEventInfo	(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V
    //   314: aload 11
    //   316: aload_1
    //   317: putfield 197	android/app/Notification:tickerText	Ljava/lang/CharSequence;
    //   320: aload 11
    //   322: invokestatic 186	java/lang/System:currentTimeMillis	()J
    //   325: putfield 201	android/app/Notification:when	J
    //   328: iload_2
    //   329: iconst_2
    //   330: if_icmpne +43 -> 373
    //   333: iload 6
    //   335: ifeq +38 -> 373
    //   338: getstatic 36	com/TwinBlade/PicturePassword/Utilities:h	I
    //   341: iconst_4
    //   342: if_icmpeq +8 -> 350
    //   345: aload 11
    //   347: ifnonnull +11 -> 358
    //   350: iconst_1
    //   351: getstatic 38	com/TwinBlade/PicturePassword/Utilities:i	I
    //   354: iadd
    //   355: putstatic 38	com/TwinBlade/PicturePassword/Utilities:i	I
    //   358: aload 10
    //   360: getstatic 38	com/TwinBlade/PicturePassword/Utilities:i	I
    //   363: aload 11
    //   365: invokevirtual 205	android/app/NotificationManager:notify	(ILandroid/app/Notification;)V
    //   368: iload_2
    //   369: putstatic 36	com/TwinBlade/PicturePassword/Utilities:h	I
    //   372: return
    //   373: iload_2
    //   374: iconst_3
    //   375: if_icmpne +43 -> 418
    //   378: getstatic 36	com/TwinBlade/PicturePassword/Utilities:h	I
    //   381: iconst_4
    //   382: if_icmpeq +15 -> 397
    //   385: getstatic 36	com/TwinBlade/PicturePassword/Utilities:h	I
    //   388: iconst_3
    //   389: if_icmpeq +8 -> 397
    //   392: aload 11
    //   394: ifnonnull +11 -> 405
    //   397: iconst_1
    //   398: getstatic 38	com/TwinBlade/PicturePassword/Utilities:i	I
    //   401: iadd
    //   402: putstatic 38	com/TwinBlade/PicturePassword/Utilities:i	I
    //   405: aload 10
    //   407: getstatic 38	com/TwinBlade/PicturePassword/Utilities:i	I
    //   410: aload 11
    //   412: invokevirtual 205	android/app/NotificationManager:notify	(ILandroid/app/Notification;)V
    //   415: goto -47 -> 368
    //   418: iload_2
    //   419: ifne -51 -> 368
    //   422: iload 7
    //   424: ifeq -56 -> 368
    //   427: aload 11
    //   429: ifnull +9 -> 438
    //   432: getstatic 36	com/TwinBlade/PicturePassword/Utilities:h	I
    //   435: ifeq +11 -> 446
    //   438: iconst_1
    //   439: getstatic 38	com/TwinBlade/PicturePassword/Utilities:i	I
    //   442: iadd
    //   443: putstatic 38	com/TwinBlade/PicturePassword/Utilities:i	I
    //   446: aload 10
    //   448: getstatic 38	com/TwinBlade/PicturePassword/Utilities:i	I
    //   451: aload 11
    //   453: invokevirtual 205	android/app/NotificationManager:notify	(ILandroid/app/Notification;)V
    //   456: goto -88 -> 368
    //   459: astore 5
    //   461: return
    //   462: iload_2
    //   463: iconst_1
    //   464: if_icmpeq -294 -> 170
    //   467: iload_2
    //   468: iconst_3
    //   469: if_icmpne -265 -> 204
    //   472: goto -302 -> 170
    //   475: astore 8
    //   477: return
    //
    // Exception table:
    //   from	to	target	type
    //   97	108	459	java/lang/Exception
    //   108	137	459	java/lang/Exception
    //   143	156	459	java/lang/Exception
    //   156	167	459	java/lang/Exception
    //   170	190	459	java/lang/Exception
    //   190	201	459	java/lang/Exception
    //   208	220	459	java/lang/Exception
    //   220	231	459	java/lang/Exception
    //   260	328	475	java/lang/Exception
    //   338	345	475	java/lang/Exception
    //   350	358	475	java/lang/Exception
    //   358	368	475	java/lang/Exception
    //   368	372	475	java/lang/Exception
    //   378	392	475	java/lang/Exception
    //   397	405	475	java/lang/Exception
    //   405	415	475	java/lang/Exception
    //   432	438	475	java/lang/Exception
    //   438	446	475	java/lang/Exception
    //   446	456	475	java/lang/Exception
  }

  public static void a(String paramString)
  {
  }

  @SuppressLint({"InlinedApi"})
  public static boolean a()
  {
    if (Build.VERSION.SDK_INT < 9);
    while ((0xF & Resources.getSystem().getConfiguration().screenLayout) != 4)
      return false;
    return true;
  }

  public static boolean a(boolean paramBoolean1, boolean paramBoolean2)
  {
    String str = j.getString("BackupPin", "0000");
    if ((paramBoolean2) && ((str.equals("0000")) || (str.equals(""))))
    {
      Intent localIntent2 = new Intent(c, SetupPIN.class);
      localIntent2.setFlags(268435456);
      c.startActivity(localIntent2);
      a(c, c.getString(2131296458), 3, true);
      return false;
    }
    int k;
    int m;
    label135: int n;
    label161: int i1;
    label187: int i2;
    if (j.getString("FirstGestureType", "none").equals("none"))
    {
      k = 0;
      if (!j.getString("SecondGestureType", "none").equals("none"))
        break label301;
      m = 0;
      if (!j.getString("ThirdGestureType", "none").equals("none"))
        break label307;
      n = 0;
      if (!j.getString("FourthGestureType", "none").equals("none"))
        break label313;
      i1 = 0;
      if (!j.getString("FifthGestureType", "none").equals("none"))
        break label319;
      i2 = 0;
      label213: if ((k != 0) || (m != 0) || (n != 0) || (i1 != 0) || (i2 != 0))
        break label343;
      if (!bd.a(c))
        break label325;
    }
    label301: label307: label313: label319: label325: for (Intent localIntent1 = new Intent(c, GesturePreferencesPlus.class); ; localIntent1 = new Intent(c, GesturePreferences.class))
    {
      localIntent1.setFlags(268435456);
      c.startActivity(localIntent1);
      a(c, c.getString(2131296455), 4, true);
      return false;
      k = 1;
      break;
      m = 1;
      break label135;
      n = 1;
      break label161;
      i1 = 1;
      break label187;
      i2 = 1;
      break label213;
    }
    label343: int i4;
    if (paramBoolean1)
    {
      if ((k != 0) && (j.getString("FirstGestureData", "0").equals("0")))
        k = 0;
      if ((m != 0) && (j.getString("SecondGestureData", "0").equals("0")))
        m = 0;
      if ((n != 0) && (j.getString("ThirdGestureData", "0").equals("0")))
        n = 0;
      if ((i1 != 0) && (j.getString("FourthGestureData", "0").equals("0")))
        i1 = 0;
      if ((i2 != 0) && (j.getString("FifthGestureData", "0").equals("0")))
        i4 = k;
    }
    int i3;
    for (int i5 = 0; ; i5 = i3)
    {
      if ((i4 == 0) && (m == 0) && (n == 0) && (i1 == 0) && (i5 == 0))
        a(c, c.getString(2131296460), 4, true);
      if ((i4 == 0) && (m == 0) && (n == 0) && (i1 == 0) && (i5 == 0))
        break;
      return true;
      i3 = i2;
      i4 = k;
    }
  }

  public static void b()
  {
    Intent localIntent = new Intent(c, LockActivity.class);
    localIntent.setFlags(268435456);
    c.startActivity(localIntent);
  }

  public static void b(Context paramContext)
  {
    if (PreferenceManager.getDefaultSharedPreferences(paramContext).getBoolean("HapticFeedback", true))
      ((Vibrator)paramContext.getSystemService("vibrator")).vibrate(75L);
  }

  public static void c(Context paramContext)
  {
    AlertDialog.Builder localBuilder = new AlertDialog.Builder(paramContext);
    localBuilder.setTitle(paramContext.getString(2131296291));
    localBuilder.setMessage(paramContext.getString(2131296283));
    localBuilder.setPositiveButton(paramContext.getString(2131296292), new cv(paramContext));
    localBuilder.setNegativeButton(paramContext.getString(2131296293), new cw());
    localBuilder.create().show();
  }

  public static void d(Context paramContext)
  {
    AlertDialog.Builder localBuilder = new AlertDialog.Builder(paramContext);
    localBuilder.setTitle("PayPal Serial Key");
    String str = j.getString("PayPalKey", "-1");
    localBuilder.setMessage("Your Serial Key: " + str);
    localBuilder.setPositiveButton("Copy to Clipboard", new cz(paramContext, str));
    localBuilder.setNegativeButton("OK", new da());
    localBuilder.create().show();
  }

  public static void e(Context paramContext)
  {
    paramContext.sendBroadcast(new Intent("com.TwinBlade.PicturePassword.LVL_STATUS"));
  }

  private static void g(Context paramContext)
  {
    AlertDialog.Builder localBuilder = new AlertDialog.Builder(paramContext);
    localBuilder.setTitle(paramContext.getString(2131296287));
    localBuilder.setMessage(paramContext.getString(2131296288));
    localBuilder.setPositiveButton(paramContext.getString(2131296289), new cx(paramContext));
    localBuilder.setNegativeButton(paramContext.getString(2131296290), new cy(paramContext));
    localBuilder.create().show();
  }

  public void onCreate()
  {
    super.onCreate();
    try
    {
      ACRA.init(this);
      label8: c = this;
      j = PreferenceManager.getDefaultSharedPreferences(this);
      b = (int)Math.ceil(25.0F * getResources().getDisplayMetrics().density);
      e(c);
      return;
    }
    catch (IllegalStateException localIllegalStateException)
    {
      break label8;
    }
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     com.TwinBlade.PicturePassword.Utilities
 * JD-Core Version:    0.6.2
 */